package com.yanqu.road.entity.activity;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.List;
import java.util.Objects;

public class ActivityDisperseGoldInfo extends DataObject {
    private long disperseId;
    private int activityId;
    private int type;
    private long userId;
    private long beginTime;
    private String reward;
    private String manifesto;
    private boolean sendEmail;
    private int playerNum;
    private String honoraryTitles;
    private long serverId;                 //散财者区服
    private List<Long> serverList;         //散财区服
    private boolean wait = false;
    private UserBaseInfo userBaseInfo = new UserBaseInfo();
    private int groupId;

    public boolean isWait() {
        return wait;
    }

    public void setWait(boolean wait) {
        this.wait = wait;
    }

    public long getDisperseId() {
        return disperseId;
    }

    public void setDisperseId(long disperseId) {
        if(this.disperseId != disperseId) {
            this.disperseId = disperseId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        if(this.type != type) {
            this.type = type;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(long beginTime) {
        if(this.beginTime != beginTime) {
            this.beginTime = beginTime;
            setUpdateOption();
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if(!Objects.equals(this.reward, reward)) {
            this.reward = reward;
            setUpdateOption();
        }
    }

    public boolean isSendEmail() {
        return sendEmail;
    }

    public void setSendEmail(boolean sendEmail) {
        if(this.sendEmail != sendEmail) {
            this.sendEmail = sendEmail;
            setUpdateOption();
        }
    }

    public String getManifesto() {
        return manifesto;
    }

    public void setManifesto(String manifesto) {
        if(!Objects.equals(this.manifesto, manifesto)) {
            this.manifesto = manifesto;
            setUpdateOption();
        }
    }

    public int getPlayerNum() {
        return playerNum;
    }

    public void setPlayerNum(int playerNum) {
        if(this.playerNum != playerNum) {
            this.playerNum = playerNum;
            setUpdateOption();
        }
    }

    public String getHonoraryTitles() {
        return honoraryTitles;
    }

    public void setHonoraryTitles(String honoraryTitles) {
        if(!Objects.equals(this.honoraryTitles, honoraryTitles)) {
            this.honoraryTitles = honoraryTitles;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public List<Long> getServerList() {
        return serverList;
    }

    public void setServerList(List<Long> serverList) {
        this.serverList = serverList;
        setUpdateOption();
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
        setUpdateOption();
    }

    public String getUserBaseInfoJsonString(){
        if(null == userBaseInfo){
            return "{}";
        }else {
            return JSON.toJSONString(userBaseInfo);
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if(this.groupId != groupId) {
            this.groupId = groupId;
            setUpdateOption();
        }
    }
}
